<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            /* 发发 */
            margin: 0;
            padding: 0;
        }

        .box {
            box-sizing: border-box;
            width: 800px;
            height: 500px;

            margin: 100px auto;
            display: flex;
            color: white;
        }

        .box .left {
            width: 300px;
            height: 500px;
            background-color: rgb(35, 128, 227);
            display: flex;
            justify-content: center;
        }

        .box .left .box1 {
            width: 150px;
            height: 150px;

            margin-top: 150px;
        }

        .box .left .box1 .biaotou {
            width: 150px;
            height: 80px;

            text-align: center;
            line-height: 40px;
        }

        .box .left .box1 .zhuce {
            width: 50px;
            height: 30px;
            border: 1px solid white;
            border-radius: 10px;
            color: white;
            margin: 20px auto;
            text-align: center;
            line-height: 30px;

        }

        .box .right {
            width: 500px;
            height: 500px;

            color: black;
        }

        .box .right .box2 {
            width: 400px;
            height: 300px;

            margin: 80px auto;
        }

        .box .right .box2 h2 {
            text-align: center;
        }

        .box .right .box2 .kuang input {
            width: 300px;
            height: 30px;
            text-align: center;
            margin-left: 45px;
            margin-top: 20px;
            border: 0;
            border-bottom: 1px solid grey;
        }

        .box .right .box2 .xieyi {
            display: flex;
            padding-left: 45px;
            margin-top: 30px;
        }

        .box .right .box2 .xieyi .kuang {
            width: 15px;
            height: 15px;
            border-radius: 2px;
            background-color: rgb(35, 128, 227);
            margin-top: 4px;
            color: white;
            text-align: center;
            line-height: 15px;
        }
        .box .right .box2 .xieyi span:nth-child(3){
            display: block;
            color: rgb(35, 128, 227);
        }
        .box .right .box2 .xieyi span:nth-child(4){
            display: block;
            padding-left: 62px;
            color: grey;
        }
        .box .right .box2 .denglu{
            width: 280px;
            height: 30px;
            background-color: rgb(35, 128, 227);
            text-align: center;
            line-height: 30px;
            border-radius: 50px;
            color: white;
            margin:20px auto;
            cursor: pointer;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="left">
            <div class="box1">
                <div class="biaotou">
                    <span>欢迎！</span><br>
                    <span>知意小程序·控制台</span>
                </div>
                <div class="zhuce">注册</div>
            </div>
        </div>
        <div class="right">
            <div class="box2">
                <h2>登录</h2>
                <div class="kuang">
                    <input type="text" placeholder="请输入电话号码"><br>
                    <input class="d" type="text" placeholder="设置密码">
                </div>
                <div class="xieyi">
                    <div class="kuang">✔</div>
                    <span>我已同意</span>
                    <span>《服务协议》</span>
                    <span>忘记密码</span>
                </div>
           <div class="denglu">登录</div>
            </div>
        </div>
    </div>
</body>

</html>
<script>
var dengluEle=document.querySelector('.denglu')
var input=document.querySelector(' .box .right .box2 .kuang input:nth-child(1)')
var input1=document.querySelector(' .box .right .box2 .kuang .d')

dengluEle.onclick=function(){
    var reg1=/^1[3-9]\d{9}$/;
    var reg2=/[\d]/
    var reg3=/[a-zA-Z]$/
    var reg4 = /^[0-9a-zA-Z]{6,}$/;
    var res1 = reg1.test( input.value );
    var res2 = reg2.test( input1.value );
    var res3 = reg3.test( input1.value );
    var res4= reg4.test( input1.value );

    if(res1&&res2&&res3&&res4){
        alert('号码密码正确');
    }
    else{
        alert('号码或密码错误');
    }
}



</script>